package com.example.tests;

import org.testng.annotations.Test;

public class ContactTest extends TestBase{

    @Test
  public void addNoneEmptyAddrbookEntry() throws Exception {
	app.navigationHelper.gotoHomePage();
    app.contactHelper.gotoAddAddressbookPage();
    ContactData addrData = new ContactData();
	addrData.firstName="Fido";
	addrData.lastName="Tolstoy";
	addrData.addr="123 Krasnaya Polyana";
	addrData.homePhone="(905)123-4567";
	addrData.mobilePhone="(289)123-4567";
	addrData.workPhone="(416)123-4567";
	addrData.email="f_tolstoy@rogers.com";
	addrData.email2="ftolstoy@gmail.com";
	addrData.bdayDay="1";
	addrData.bdayMonth="January";
	addrData.bdayYear="1971";
	addrData.addr2="456 Krasnaya Polyana";
	addrData.phone2="(905)987-9876";
	app.contactHelper.fillAddAddressbookEntryForm(app, this, addrData);
	app.contactHelper.submitAddressbookEntry();
    app.navigationHelper.gotoHomePage();
  }
    
    @Test
    public void addEmptyAddrbookEntry() throws Exception {
  	app.navigationHelper.gotoHomePage();
    app.contactHelper.gotoAddAddressbookPage();
    ContactData addrData = new ContactData();
    addrData.bdayDay="-";
    addrData.bdayMonth="-";
  	app.contactHelper.fillAddAddressbookEntryForm(app, this, addrData);
  	app.contactHelper.submitAddressbookEntry();
    app.navigationHelper.gotoHomePage();
    }
}

